package co.fitstart.weapp.api.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.GenericDaoSupport;

import co.fitstart.entity.market.OfflineExperienceSignUp;
import co.fitstart.entity.market.OnlineExperienceSignUp;
import co.fitstart.weapp.api.service.ExperienceSignUpService;

/**
 * 
 * @author haiyan_xiao
 *
 */
@Service("experienceSignUpService")
public class ExperienceSignUpServiceImpl implements ExperienceSignUpService {

    @Autowired
    private GenericDaoSupport genericDaoSupport;

    /*
     * (non-Javadoc)
     * @see co.fitstart.weapp.api.service.ExperienceSignUpService#signUp(co.fitstart.entity.market.ExperienceSignUp)
     */
    public void signUp(OfflineExperienceSignUp signUp) {
        genericDaoSupport.save(signUp.initialize());
    }

    /*
     * (non-Javadoc)
     * @see co.fitstart.weapp.api.service.ExperienceSignUpService#signUp(co.fitstart.entity.market.OnlineExperienceSignUp)
     */
    public void signUp(OnlineExperienceSignUp signUp) {
        genericDaoSupport.save(signUp.initialize());
    }

}
